.\"	$Id$
.\"
.\" Copyright (c) 2007 Jean-Francois Brousseau <phrakt@gmail.com>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd April 16, 2007
.Dt HTTP_ENTITY 3
.Os
.Sh NAME
.Nm http_entity
.Nd HTTP Entity Management API
.Sh SYNOPSIS
.Ft http_ent_t*
.Fn http_entity_alloc "enum http_ent_type type" "in flags"
.Ft void
.Fn http_entity_free "http_ent_t *ent"
.Ft int
.Fn http_entity_stat "http_ent_t *ent" "http_vhost_t *host"

.Sh DESCRIPTION
An HTTP entity is a combination of the data found in the body of an HTTP
request or response and the metainformation related to that data in the headers
of the message.
The
.Nm
interface simplifies most of the tasks related to mapping, formatting,
reading from and writing to HTTP entities.

.Fn http_entity_alloc
allocates a structure representing a new entity of type
.Fa type
and located at the path
.Fa path
in the context of the Virtual Host
.Fa host .
Allocating an entity structure does not actually create that entity.


.Fn http_entity_stat
returns the status of the entity
.Fa ent
in the context of the Virtual Host
.Fa host .
.Sh SEE ALSO
.Xr http 3 ,
.Xr http_client 3 ,
.Xr http_conn 3 ,
.Xr http_msg 3 ,
.Xr http_vhost 3 ,
.Sh NOTES
.Sh AUTHOR
.An Jean-Francois Brousseau Aq jfb@terraquati.ca
